﻿#include "BiquadIIR.h"
#include "dsp/FilterPassType.h"
#include "dsp/IIRUtil.h"
#include "lang/StringFormat.hpp"
using namespace yzrilyzr_util;
using namespace yzrilyzr_lang;
namespace yzrilyzr_dsp{
	void BiquadIIR::init(u_sample_rate sampleRate){
		IIRUtil::biquad(*this, freq, sampleRate, q, (FilterPassType)type, gain);
	}
	String BiquadIIR::toString()const{
		return StringFormat::format("IIRUtil::newBiquadIIRFilter(%f, sampleRate, %f, %f, %d)", freq, q, gain, type);
	}
}